package com.share.example.selenium.web;

import com.share.common.common.Result;
import com.share.example.selenium.service.hzhc.task.HcxxTaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/hzhc/task")
public class HzhcTaskController {

    @Autowired
    private HcxxTaskService hcxxTaskService;


    @RequestMapping("/login")
    public Result login(String username, String password) {
        return Result.success(hcxxTaskService.login(username, password));
    }

    @RequestMapping("/listTaskDetail")
    public Result listTaskDetail(String taskid, String token) {
        return Result.success(hcxxTaskService.listTaskDetail(taskid, token));
    }

    @RequestMapping("/addTaskLog")
    public Result addTaskLog(String token, String taskId, String strWriteDate, String content, String reportUserId) {
        return Result.success(hcxxTaskService.addTaskLog(token, taskId, strWriteDate, content, reportUserId));
    }
}
